package util.factory
{
	import model.ApplicationModel;
	
	import mx.containers.Canvas;
	import mx.containers.VBox;
	import mx.controls.RadioButton;
	
	import vo.Answer;
	import vo.Question;
	
	public class AnswersViewFactory
	{
		
		public function AnswersViewFactory()
		{
		}
		public function getAnswers ():VBox
		{
			var _applicationModel : ApplicationModel = ApplicationModel.instance;
			var question:Question = _applicationModel.currentCuestion;
			var vBox:VBox = new VBox();
			var i:int=0;
			while (i<question.lsAnswer.length)
			{	
				var answer:Answer = question.lsAnswer[i] as Answer;
				var radioButton:RadioButton = new RadioButton();
				radioButton.label = answer.statement;
				//radioButton.fontSize = 12;
				radioButton.id = answer.id.toString();
				radioButton.name = answer.id.toString();
				i++;
				radioButton.move(0, 30*i);
				vBox.addChild(radioButton);			
			}
			return vBox;
		}
	}
}